package com.czk.model.flyweight;

public class Client {
    public static void main(String[] args) {
        WebsiteFactory factory=new WebsiteFactory();
        // 以新闻的新式
        User user=new User();
        user.setName("陈彰坤");
        Website website1 = factory.getConcreteWebsite("新闻",user);
        website1.use();
        // 以博客的形式
        User user1=new User();
        user1.setName("吴丹");
        Website website2 = factory.getConcreteWebsite("博客",user1);
        website2.use();
        String s="hello";
        String s1=new String("hello");
        System.out.println(s.equals(s1));
        System.out.println(s==s1);
    }
}
